Skip to content

feat: add Sentry error tracking for user validation failures#56

Merged
scotwells merged 1 commit intomainfrom
feat/add-sentry-error-tracking-user-validation
Mar 2, 2026
Merged

feat: add Sentry error tracking for user validation failures#56
scotwells merged 1 commit intomainfrom
feat/add-sentry-error-tracking-user-validation

Conversation

@scotwells
Copy link

@scotwells scotwells commented Mar 2, 2026

Summary

  • Adds visibility into intermittent "User not found" errors that users experience during authentication
  • When users encounter this error, we'll now receive alerts with diagnostic information to identify the root cause
  • Helps track down why some users are unable to log in even though their accounts exist in the system

Test plan

  • Deploy to staging and trigger a login failure
  • Confirm Sentry alert is received with user context
  • Use the captured data to diagnose reported authentication issues

🤖 Generated with Claude Code


Relates to #42

Add Sentry.captureMessage calls to track "User not found" errors that
were previously invisible because they were returned as objects rather
than thrown as exceptions.

This adds error-level tracking to:
- IDP-only validation failures (disableLoginWithEmail && disableLoginWithPhone)
- Email-disabled validation failures
- Phone-disabled validation failures
- Multiple users found scenarios
- searchUsers exhausted all queries

Each capture includes detailed context (preferredLoginName, email,
organizationId, login settings) to help diagnose intermittent
authentication failures.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@scotwells scotwells requested review from a team, AriaEdo, JoseSzycho, drewr, ecv, kevwilliams and zachsmith1 and removed request for a team and AriaEdo March 2, 2026 22:38
@scotwells scotwells merged commit a797502 into main Mar 2, 2026
4 checks passed
@drewr
Copy link

drewr commented Mar 3, 2026

Thank you Scot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants